# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Daniel Micay <danielmicay@gmail.com>
# Contributor: Nicolas Pouillard <nicolas.pouillard@gmail.com>
# Contributor: Rorschach <r0rschach@lavabit.com>

pkgname=torsocks
pkgver=2.4.0
pkgrel=1
pkgdesc='Wrapper to safely torify applications'
url='https://gitlab.torproject.org/tpo/core/torsocks'
arch=('loong64' 'x86_64')
license=('GPL2')
depends=('tor')
backup=("etc/tor/${pkgname}.conf")
#source=(https://people.torproject.org/~dgoulet/${pkgname}/${pkgname}-${pkgver}.tar.xz{,.asc})
source=("${url}/-/archive/v${pkgver}/torsocks-v${pkgver}.tar.gz")
sha512sums=('7d625ce3a4600f87b86ae9ac79dfd206e7709cb0bafe0b7afcf33a6f1825f968cc63ad3e23c584582b244647bdeafbfdbfc54f7c81e521b0a3d278a1483ce86e')
validpgpkeys=('B74417EDDF22AC9F9E90F49142E86A2A11F48D36')

build() {
  cd ${pkgname}-v${pkgver}
  autoreconf -vfi
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc
  make
}

package() {
  cd ${pkgname}-v${pkgver}
  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:
